package cc.jq1024.infrastructure.persistent.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户积分订单记录
 * </p>
 *
 * @author lijiaqiang@ljq1024.cc
 * @since 2024-07-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserCreditOrderPO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 订单ID
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 交易名称
     */
    @TableField("trade_name")
    private String tradeName;

    /**
     * 交易类型；forward-正向、reverse-逆向
     */
    @TableField("trade_type")
    private String tradeType;

    /**
     * 交易金额
     */
    @TableField("trade_amount")
    private BigDecimal tradeAmount;

    /**
     * 业务仿重ID - 外部透传。返利、行为等唯一标识
     */
    @TableField("out_business_no")
    private String outBusinessNo;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;


}
